<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="<%=request.getContextPath()%>/js/jquery.min.js"></script>
</head>
<body>
<div class="modal-dialog ">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
			<h4 class="modal-title" id="myModalLabel">审核不通过原因</h4>
		</div>
		<div class="modal-body">
		<form action="<%=request.getContextPath()%>/withdraw/disagreeWithdraw" method="post" 
		  id="noPassForm" >
			<input type="hidden" name="uuid" id="orderNo">
			<input type = "hidden" name = "status" id = "status">
			<textarea rows="5" cols="30" name="remarks" id="remarks"></textarea>
			
			</div>
			<div class="modal-footer">
				<input type="button" class="btn btn-primary" onclick="return subModal();" value="提交">
				<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
			</div>
		</form>
	</div>
</div>
</body>
<script>
function subModal(){
	
	var reason = $("#remarks").val();
	var uuid = $("#orderNo").val();
	if(reason==null || reason==""){
		alert("请填写不通过原因");
		return false;
	}else{
		 $.ajax({
             type: "POST",
             url: "<%=request.getContextPath()%>/withdraw/disagreeWithdraw",
             data: {uuid:uuid,remarks:reason},
             dataType: "json",
             success: function(data){
            	 		if(data.code=='false'){
                            alert(data.des);
            	 		}else{
            	 			window.location.href="<%=request.getContextPath()%>/withdraw/list?status=1"
            	 		}
                      }
         });
	}
}
</script>
</html>